package com.wjs.service.impl;

import com.wjs.entity.Phone;
import com.wjs.mapper.PhoneMapper;
import com.wjs.service.PhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PhoneServiceImpl implements PhoneService {
    @Autowired
    private PhoneMapper phoneMapper;

    @Override
    public List<Phone> selectAll() {
        return phoneMapper.selectAll();
    }

    @Override
    public void insertPhone(Phone phone) {
        phoneMapper.insertPhone(phone);
    }

    @Override
    public void deletePhoneById(Integer id) {
        phoneMapper.deletePhoneById(id);
    }

    @Override
    public Phone selectPhoneById(Integer id) {
        return phoneMapper.selectPhoneById(id);
    }

    @Override
    public void updatePhone(Phone phone) {
        phoneMapper.updatePhone(phone);
    }

    @Override
    public void deleteMany(int[] ids) {
        phoneMapper.deleteMany(ids);
    }
}
